package com.changan.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.changan.entity.Menu;
import com.changan.entity.Role;
import com.changan.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.changan.vo.UserVO;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author NieChangan
 * @since 2022-08-29
 */
public interface UserService extends IService<User> {

    Page<User> getUserByPage(Page<User> page, UserVO userVO);

    /**
     * 导出用户Excel
     * @param response
     * @param userVO
     * @throws IOException
     */
    void exportExcel(HttpServletResponse response, UserVO userVO)throws IOException;

    String login(String username, String password);

    List<Role> findRolesById(Long id);

    List<Menu> findMenuByRoles(List<Role> roles);
}
